
function initThumbupAndComment(){
     // 点评论小图标获得焦点输入框
    $(".msg-discuss").each(function(){
        this.addEventListener("touchstart",function(){
             var _this = this;
             goToReplyLiveState($(_this).parents(".msg-author").children("span").text(),$(_this).attr("msgid"));
        },false);
    });
    
    // 不停地点赞
    $(".msg-favour").each(function(){
        var _this = this;
        var newValue = 0;
        var _bv = parseInt($(_this).find("b").text());
        this.addEventListener("touchstart",function(e){
            if($("#only-temp").length>0){
                return ;
            }else{
                $.ajax({
                    type: "POST",
                    url: "/faxsun-info/api/v1/live/thumbsup/"+$(_this).attr("msgid"),
                    contentType : "application/x-www-form-urlencoded",
                    success: function(data) {
                        newValue = data;
                        $(_this).find("b").text( newValue );

                    },
                    error: function(xhr, error) {
                        console.log(error + "-更新出错，请稍后再试 禁言");
                    }
                });

                var $clone = $(this).find("i").clone(true);
                var $add = $("<font/>").text("+1");
                var $span = $("<span/>",{
                    id: "only-temp",
                }).css({
                    "position": "absolute",
                    "top": "0px",
                    "left": "0px",
                    "width": "50px"
                });
                $span.append($clone);
                $span.append($add);
                $(this).append($span);
            }
           
            $span.stop(true).animate({
                top: "-40px",
                opacity: "0"
            },1000,function(){
                $(this).remove();
            });
        },false);
    });
}
